//
//  XZ_SVProgressView.m
//  Project_Demo
//
//  Created by caoxiaozhu on 2018/7/18.
//  Copyright © 2018年 caoxiaozhu. All rights reserved.
//

#import "XZ_SVProgressView.h"

@implementation XZ_SVProgressView

+(void)showClearBac{
    /*
     [SVProgressHUD show];
     [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeGradient];
     [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
     [SVProgressHUD setMinimumDismissTimeInterval:5];
     [SVProgressHUD setOffsetFromCenter:UIOffsetMake(0, 100)];
     */
    [SVProgressHUD show];
}

+(void)showWithBlackAlpha{
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    [SVProgressHUD show];
}

+(void)showBlackContentWithClearBac{
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
    [SVProgressHUD show];
}

+(void)showBlackContentWithBlackAlphaBac{
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    [SVProgressHUD show];
}

//+(void)showBlackAlphaContentString:(NSString *)str{
//    [SVProgressHUD setMinimumSize:CGSizeMake(100, 100)];
//    [SVProgressHUD setBackgroundColor:[[UIColor blackColor]colorWithAlphaComponent:0.5]];
//    [SVProgressHUD setForegroundColor:Color_White];
//    [SVProgressHUD setDefaultAnimationType:SVProgressHUDAnimationTypeFlat];
//    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
//}

+(void)showWithDescription:(NSString *)des showType:(showType)type{
    [SVProgressHUD setMinimumSize:CGSizeMake(100, 100)];
    [SVProgressHUD setBackgroundColor:[[UIColor blackColor]colorWithAlphaComponent:0.5]];
    [SVProgressHUD setForegroundColor:Color_White];
    [SVProgressHUD setDefaultAnimationType:SVProgressHUDAnimationTypeFlat];
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    [SVProgressHUD setMinimumDismissTimeInterval:3];
//    [SVProgressHUD setMaximumDismissTimeInterval:3];
    
    if (type == ShowNormal) {
        [SVProgressHUD showWithStatus:des];
    }else if ( type == ShowError){
        [SVProgressHUD showErrorWithStatus:des];
    }else if (type == ShowSuccess){
        [SVProgressHUD showSuccessWithStatus:des];
    }else if (type==ShowInfo){
        [SVProgressHUD showInfoWithStatus:des];
    }
}

+(void)showCustomGIFname:(NSString *)name ImageSize:(CGSize)size StatusStr:(NSString *)statusStr{
    
    [SVProgressHUD setMinimumSize:CGSizeMake(100, 100)];
    [SVProgressHUD setBackgroundColor:[[UIColor blackColor]colorWithAlphaComponent:0.5]];
    [SVProgressHUD setForegroundColor:Color_White];
    [SVProgressHUD setInfoImage:[UIImage imageWithGIFNamed:name]];
    [SVProgressHUD setImageViewSize:size];
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    [SVProgressHUD setMinimumDismissTimeInterval:3];
    [SVProgressHUD showInfoWithStatus:statusStr];
    
}

+(void)dismiss{
    [SVProgressHUD dismiss];
}


@end
